package com.spzx.JUC3.test1;

import java.util.concurrent.CountDownLatch;

public class CountDownLatchThread02 implements Runnable{
    private CountDownLatch countDownLatch;
    public CountDownLatchThread02(CountDownLatch countDownLatch){
        this.countDownLatch=countDownLatch;
    }

    @Override
    public void run() {

        try {
            Thread.sleep(3000);
            System.out.println("3秒以后执行了CountDownLatchThread02......");
        } catch (InterruptedException e) {
            e.printStackTrace();
        }

        countDownLatch.countDown();

    }
}
